From: Eli Zaretskii Date: Sat, 20 Jan 2007 15:42:57 +0000 (+0000) Subject: (last-sexp-toggle-display): Fixed cursor position when toggle abbreviated X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~2774 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c7c8f0418259f2a7ff7a8b32943f868cd798a021;p=emacs.git (last-sexp-toggle-display): Fixed cursor position when toggle abbreviated display. --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index a58ecb256ac..3a501ea85c1 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -490,6 +490,8 @@ alternative printed representations that can be displayed." (point (point))) (delete-region beg end) (insert (nth 1 value)) + (or (= beg point) + (setq point (1- (point)))) (last-sexp-setup-props beg (point) (nth 0 value) (nth 2 value)